// 获取列表数据
export async function fetchLists() {
  try {
    const config = useRuntimeConfig();
    const response = await $fetch(`${config.public.apiBase}/api/lists`);
    return response;
  } catch (error) {
    console.error('Error fetching lists:', error);
    return {
      left: [],
      right: []
    };
  }
}

// 获取内容数据
export async function fetchContent() {
  try {
    const config = useRuntimeConfig();
    const response = await $fetch(`${config.public.apiBase}/api/content`);
    return response;
  } catch (error) {
    console.error('Error fetching content:', error);
    return {
      title: 'Welcome to My Website',
      body: 'This is the main content of the website.',
      footer: '© 2024 My Website'
    };
  }
}
